﻿using System;
using GdNet.WebFramework.Domain.ReferencesData;
using GdNet.WebFramework.Domain.Repositories.ReferencesData;

namespace GdNet.Applications.DataGeneration.DataAssistants
{
    public static class CatalogAssistant
    {
        public static void GenerateSampleCatalogs(ICatalogRepository catalogRepository)
        {
            Console.WriteLine("Generating catalogs...");

            var languagesCatalog = Catalog.Factory.Create("c.languages", "Languages");
            languagesCatalog.AddDataLine(DataLine.Factory.Create("vi-VN", "Vietnamese"));
            languagesCatalog.AddDataLine(DataLine.Factory.Create("en-US", "English (US)"));

            catalogRepository.Save(languagesCatalog);
        }
    }
}
